package com.example.service.impl;


import com.example.dao.AdminDao;
import com.example.dao.StuAchievementDao;
import com.example.entity.Admin;
import com.example.entity.StuAchievement;
import com.example.entity.Teacher;
import com.example.service.AdminService;
import com.example.service.StuAchievementService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StuAchievementServiceImpl implements StuAchievementService {


    @Autowired
    private StuAchievementDao stuAchievementDao;

    @Override
    public List<StuAchievement> getPage(int currentPage, int pageSize) {
        currentPage=currentPage*pageSize-pageSize;
        return stuAchievementDao.getPage(currentPage,pageSize);
    }

    @Override
    public int getTotalCount() {

        return stuAchievementDao.getTotalCount();
    }


}
